package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkAccountReceivable;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkAccountReceivableVo;
import com.ruoyi.logistic.mapper.NetworkAccountReceivableMapper;
import com.ruoyi.logistic.service.NetworkAccountReceivableService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;
@Service
public class NetworkAccountReceivableServiceImpl implements NetworkAccountReceivableService {
    @Autowired
    private NetworkAccountReceivableMapper networkAccountReceivableMapper;
    @Override
    public List<NetworkAccountReceivable> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkAccountReceivableMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkAccountReceivable networkAccountReceivable) {
        return networkAccountReceivableMapper.insert(networkAccountReceivable);
    }

    @Override
    public Boolean update(NetworkAccountReceivable networkAccountReceivable) {
        return networkAccountReceivableMapper.update(networkAccountReceivable);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkAccountReceivableMapper.deleteById(id);
    }

    @Override
    public NetworkAccountReceivable findById(Integer id) {
        return networkAccountReceivableMapper.findById(id);
    }

    @Override
    public List<NetworkAccountReceivable> search(NetworkAccountReceivableVo networkAccountReceivableVo) {
        PageHelper.startPage(networkAccountReceivableVo.getPageDate());
        return networkAccountReceivableMapper.search(networkAccountReceivableVo);
    }


}
